package com.lhs.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lhs.entity.blog.blog_cover;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
* @author 15977
* @description 针对表【blog_cover】的数据库操作Mapper
* @createDate 2025-09-11 09:04:15
* @Entity com.lhs.blog.blog_cover
*/
@Mapper
public interface blog_coverMapper extends BaseMapper<blog_cover> {

    @Select("INSERT INTO blog_cover (postId, cover) VALUES (#{postId}, #{cover})")
    blog_cover saveCover(blog_cover cover);

    @Select("DELETE FROM blog_cover WHERE postId = #{postId}")
    void removeById(Long postId);

    @Select("SELECT cover FROM blog_cover WHERE postId = #{postId}")
    String getCoverByPostId(Long postId);
}




